<#include "/common/layout_dl.html">
<@header>
</@header>
<@body>
 <form class="form-horizontal layui-form layui-form-pane"  method="post" action="/u/testcase/doEdit">
     <div class="box-body">
         <div class="form-group">
             <label for="testcaseName" class="col-sm-2 control-label">用例名称</label>
             <input type="hidden" value="${testcase.id}" name="id">
             <div class="col-sm-10">
                 <input type="text" id="testcaseName" name="testcaseName" value="${(testcase.testcaseName)!}" class="form-control" placeholder="请输入用例名" lay-verify="required|testcaseName">
             </div>
         </div>

         <div class="form-group">
             <label for="path" class="col-sm-2 control-label">接口地址</label>
             <div class="col-sm-10">
                 <input type="text" id="path" name="path" value="${(testcase.path)!}" class="form-control" placeholder="请输入接口地址">
             </div>
         </div>

         <div class="form-group">
             <label for="parameter" class="col-sm-2 control-label">接口参数</label>
             <div class="col-sm-10">
                 <textarea class="form-control"id="parameter" name="parameter" rows="3"  placeholder="请输入接口参数" >${(testcase.parameter)!}</textarea>
             </div>
         </div>

         <div class="form-group">
             <label class="col-sm-2 control-label">参数类型</label>
             <div class="col-sm-10">
                 <select  name="contenttype" class="form-control select2" lay-ignore style="width: 100%;" lay-verify="required">
                     <option value="application/json" ${(testcase.contenttype=="application/json")?string('selected="selected"','')} >application/json</option>
                     <option value="application/x-www-form-urlencoded"  ${(testcase.contenttype=="application/x-www-form-urlencoded")?string('selected="selected"','')}  >application/x-www-form-urlencoded</option>

                 </select>
             </div>
         </div>
         <div class="form-group">
             <label class="col-sm-2 control-label">项目</label>
             <div class="col-sm-10">
                 <select name="projectId" class="form-control select2" lay-ignore style="width: 100%;" lay-verify="required">
                     <#list projectList as project>
                        <option value="${(project.id)!}"  ${(testcase.projectId?? && project.id==testcase.projectId)?string('selected="selected"','')}  >${(project.projectName)!}</option>
                     </#list>
                 </select>
             </div>
         </div>

         <div class="form-group">
             <label class="col-sm-2 control-label">备注</label>
             <div class="col-sm-10">
                 <textarea class="form-control" name="comment" rows="3"  placeholder="请输入描述，最多300个字符 ..." >${(testcase.comment)!}</textarea>
             </div>
         </div>


     </div>
     <div class="form-group">
         <label  class="col-sm-2 control-label"></label>
         <div class="col-sm-10">
             <button type="submit" class="btn btn-success" lay-submit lay-filter="submit"><i class="fa fa-save"></i>  提 交</button>
         </div>
     </div>
  </div><!-- /.box-body -->
</form>
</@body>
<@footer>
</@footer>